package com.jd.finance.core.controller.admin;

import com.jd.finance.core.service.LoanService;
import com.jd.finance.result.BaseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "业务接口")
@Slf4j
@RestController
@RequestMapping("/admin/core/adminWorkCenter")
public class AdminWorkCenterController {
    @Resource
    public LoanService loanService;


    @ApiOperation("根据银行id，获取同一个银行所有信贷员列表（不分页，根据业绩正序排序）")
    @GetMapping("/getLoanOfficerInfo")
    public BaseResult getLoanOfficerInfo(Integer bid){
        if (bid == null){
            log.error("银行id为空");
            return BaseResult.error().message("银行id为空");
        }

        return loanService.getLoanOfficerInfo(bid);

    }
}
